<?php
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/logic/CustomCommand.php';
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/model/factory/DaoFactory.php';
	
	error_reporting (E_ALL ^ E_NOTICE);
	

	
	/*
	* Class to validate a credential
	*/
	class CommandChangeProduct extends CustomCommand {
		/*
		* Constructor of the class
		*/
			public function __construct($pkCode, $pkname, $unitCost) {
			$this -> name = $name;
			$this -> unitCost = $unitCost;
		}
		
		/*
		* Method to execute to validate the credential
		*/
		public function execute() {

			$daoFactory= DaoFactory:: getMySqlDaoFactory();
			$iuad= $daoFactory-> getMySqlProductAccessDao();			
			$auth=$iuad->changeProduct( $this -> name,$this->unitCost);
			

	
			$this -> result = $auth;
		}
	}
?>